﻿using System.ComponentModel.Composition;
using System.Windows.Media;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;

namespace FlexHighlighter
{
    #region Format definition

    /// <summary>
    /// Defines an editor format for the FlexHighlighter type that has a purple background
    /// and is underlined.
    /// </summary>
    [Export(typeof (EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "begin")]
    [Name("begin")]
    [UserVisible(true)] //this should be visible to the end user
    [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
    internal sealed class FlexHighlighterBeginFormat : ClassificationFormatDefinition
    {
        /// <summary>
        /// Defines the visual format for the "FlexHighlighter" classification type
        /// </summary>
        public FlexHighlighterBeginFormat()
        {
            this.DisplayName = "beginToken"; //human readable version of the name
            this.BackgroundColor = Colors.BlueViolet;
            this.TextDecorations = System.Windows.TextDecorations.Underline;
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "token")]
    [Name("token")]
    [UserVisible(true)]
    [Order(Before = Priority.Default)]
    internal  sealed class  FlexHighlighterTokenFormat : ClassificationFormatDefinition
    {
        public FlexHighlighterTokenFormat()
        {
            this.DisplayName = "baseToken";
            this.BackgroundColor = Colors.CornflowerBlue;
            this.TextDecorations = System.Windows.TextDecorations.Underline;
        }
    }
    #endregion //Format definition
}
